-- GENERATED SPELL FOR [Shadowy Initiate] --


function spell0_18716(pUnit, Event) --@Corruption,n/a--
pUnit:FullCastSpellOnTarget(32063,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18716', 26000, 1)
end

function spell1_18716(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(9613,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18716', 3000, 1)
end

function Sorts_18716(pUnit, Event)
local choix_sorts_18716 = math.random(0, 1)
if choix_sorts_18716 == 0 then
pUnit:RegisterEvent('spell0_18716', 1, 1)
end
if choix_sorts_18716 == 1 then
pUnit:RegisterEvent('spell1_18716', 1, 1)
end
end

function mob18716_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_18716', math.random(1500, 3000), 1)
end

function mob18716_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18716_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18716_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(18716, 1, 'mob18716_Action')
RegisterUnitEvent(18716, 2, 'mob18716_Leave')
RegisterUnitEvent(18716, 3, 'mob18716_Kill')
RegisterUnitEvent(18716, 4, 'mob18716_Die')
